#include <bits/stdc++.h>
using namespace std;
int n;
int r;
int cnt[100010];
int ans=0;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    for (int i=1;i<=100000;i++)
    {
        cnt[i]=0;
    }
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&r);
        cnt[r]++;
    }
    int pre=0;
    for (int i=1;i<=100000;i++)
    {
        int can=min(cnt[i],pre);
        ans+=can;
        pre=pre-can+cnt[i];
    }
    printf("%d\n",n-ans);
    return 0;
}
